import { ApiProperty } from '@nestjs/swagger';
import { IsDateString, IsNotEmpty, IsString } from 'class-validator';
import { Types } from 'mongoose';
import { ShareDto } from './share.dto';

export class WebsitesDto extends ShareDto {
  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '网站标题',
    example: '百度',
  })
  title: string;

  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '网站地址',
    example: 'https://www.baidu.com'
  })
  url: string;

  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '网站图标Url',
    example: 'https://www.baidu.com/favicon.ico'
  })
  iconUrl: string;

  // validator
  @IsString()
  //swagger
  @ApiProperty({
    description: '网站简介',
    example: '搜索引擎'
  })
  description: string;

  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '网站类型',
    example: '6319f780eeb802d165678241'
  })
  type: string
}